﻿using Microsoft.EntityFrameworkCore;
using Yz.Model.Entities;

namespace Yz.DB.EFCore.Dal
{
    /// <summary>
    /// Yz数据库
    /// </summary>
    public class YzContext : DbContext
    {
        #region 数据库连接 

        public YzContext(DbContextOptions<YzContext> options) : base(options)
        {
        }
        #endregion


        #region 数据表 
        /// <summary>
        /// 公告
        /// </summary> 
        public DbSet<Notice> Notices { get; set; }
        /// <summary>
        /// 学生信息
        /// </summary>
        public DbSet<Student> Students { get; set; }
        /// <summary>
        /// 公司信息
        /// </summary>
        public DbSet<Company> Companys { get; set; }
        /// <summary>
        /// 补考设置
        /// </summary>
        public DbSet<SupplementSetting> SupplementSettings { get; set; }
        /// <summary>
        /// 系统设置
        /// </summary>
        public DbSet<SysSetting> SysSettings { get; set; }
        /// <summary>
        /// 用户管理
        /// </summary>
        public DbSet<User> Users { get; set; }
        #endregion


        #region 增加数据库表字段限制
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {

        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {


        }
        #endregion
    }
}
